<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">新增套餐</h4>
    <!--<button ui-sref="app.setMeal" class="btn-back btn btn-dark btn-sm btn-rounded">-->
        <!--返回-->
    <!--</button>-->
</div>
<div class="wrapper-md" ng-controller="setMealAddCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            新增套餐
        </div>
        <div class="panel-body">
            <form name="merchantsEditform" class="form-horizontal ng-pristine ng-valid ng-valid-date ng-valid-required ng-valid-parse ng-valid-date-disabled"
                  method="POST" ng-submit="addSetMeal()">
                <div class="form-group">
                    <label class="col-sm-2 control-label">套餐名称</label>
                    <div class="col-sm-5">
                        <input type="text" ng-model="setMeal.name"  class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">类型</label>
                    <div class="col-sm-5">
                        <div class="inline m-r-xs">
                            <div class="radio inline m-r-n">
                                <label class="i-checks i-checks-sm">
                                    <input type="radio" name="isDefault" ng-model="setMeal.type" value="0" class="ng-pristine ng-untouched ng-valid">
                                    <i></i>
                                </label>
                            </div>
                            <p class="inline m-n">单店铺商户</p>
                            <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="单店铺商户" popover-trigger="mouseenter"></i>
                        </div>
                        <div class="inline m-r-xs">
                            <div class="radio inline m-r-n">
                                <label class="i-checks i-checks-sm">
                                    <input type="radio" name="isDefault" ng-model="setMeal.type" value="1" class="ng-pristine ng-untouched ng-valid">
                                    <i></i>
                                </label>
                            </div>
                            <p class="inline m-n">连锁品牌商户</p>
                            <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="连锁商户" popover-trigger="mouseenter"></i>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">是否免费</label>
                    <div class="col-sm-5">
                        <div class="pull-left">
                            <label class="i-switch m-t-xs m-r">
                                <input type="checkbox" ng-model="setMeal.isOpenFree" ng-true-value="1" ng-false-value="0" ng-click="setMeal.money=0">
                                <i></i>
                            </label>
                        </div>
                        <label class="pull-left m-t-xs m-r" ng-bind="{1:'已开启',0:'不开启'}[setMeal.isOpenFree]"></label>
                        <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="是否免费套餐" popover-trigger="mouseenter"></i>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">套餐金额</label>
                    <div class="col-sm-5">
                        <input type="text" ng-model="setMeal.money" name="money" ng-pattern="/^(?:[1-9]\d*|0)(?:\.\d{1,2})?$/" class="form-control">
                    </div>
                    <div id="error"  ng-if="merchantsEditform.money.$touched">
                        <label class="pull-left text-left text-danger  wrapper-xs text-base"  ng-if="merchantsEditform.money.$error.pattern">请填写正确的金额</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">套餐内容</label>
                    <div class="col-sm-5">
                        <textarea rows="10" ng-model="setMeal.content" style="width: 100%" ></textarea>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group ">
                    <div class="col-sm-4 col-sm-offset-2 ">
                        <button type="submit" class="btn btn-success" ng-disabled="merchantsEditform.$invalid">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>




